<?php
if (isset($_GET['id_works'])) {
    $id_works = $_GET['id_works'];
    echo $id_works;
} else {
    echo 'null';
}
?>